package chapter3.section4;

/**
 * 程序 3-7：输出50个能被3整除的数
 *
 * @author 张玮婷 20245080902061
 */

public class ForDemo50 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 100; ; i++) {
            if (i % 3 == 0) {
                count++;
                System.out.print(i + "\t");
            }
            if (count == 50) {
                break;  //退出循环
            }
        }
        System.out.println("程序结束！");
    }
}
